// src/main/java/com/zy/bean/Product.java
package com.example.demo.bean;

public class Product {
    private int id;
    private String pname;
    private double price;

    // 必须有无参构造器
    public Product() {}

    // Getter 和 Setter
    public int getId() { return id; }
    public void setId(int id) { this.id = id; }

    public String getPname() { return pname; }
    public void setPname(String pname) { this.pname = pname; }

    public double getPrice() { return price; }
    public void setPrice(double price) { this.price = price; }

    @Override
    public String toString() {
        return "Product{id=" + id + ", pname='" + pname + "', price=" + price + "}";
    }
}